/*
 * Copyright (c) 2003
 * XDoclet Team
 * All rights reserved.
 */
package org.xdoclet.plugin.qtags.doclipse;

import java.net.URL;

import org.generama.JellyTemplateEngine;
import org.generama.MetadataProvider;
import org.generama.Plugin;
import org.generama.QDoxCapableMetadataProvider;
import org.generama.WriterMapper;

import org.generama.tests.AbstractXMLGeneratingPluginTestCase;

import org.xdoclet.QDoxMetadataProvider;

/**
 * testcase for doclipse definition file generation
 *
 * @author kostik
 */
public class QTagDoclipsePluginTestCase extends AbstractXMLGeneratingPluginTestCase {
    protected URL getExpected() throws Exception {
        return getResourceURLRelativeToThisPackage("expected/definition.xml");
    }

    protected MetadataProvider createMetadataProvider() throws Exception {
        URL reader = getResourceRelativeToThisPackage("../impl/test/FooBarTag.java");
        return new QDoxMetadataProvider(reader);
    }

    protected Plugin createPlugin(MetadataProvider metadataProvider, WriterMapper writerMapper)
        throws Exception {
        QTagDoclipsePlugin plugin = new QTagDoclipsePlugin(new JellyTemplateEngine(),
                (QDoxCapableMetadataProvider) metadataProvider, writerMapper);
        plugin.setNamespace("foo");
        return plugin;
    }
}